﻿@using Sausage.Web.Domain
@using Sausage.Web.DataModel
@using Sausage.Web.Models
@model Project
@{
    ViewBag.Title = string.Format("查看工程计划履历（{0}）", Model.ProjectName);
    Layout = "~/Views/Shared/MainLayout.cshtml";
}
<h2>@ViewBag.Title</h2>
<br />
<table class="TableDetail">
    <tr>
        <th colspan="4" style="text-align: center">
            @Html.ActionLink(Model.ProjectName, "ViewProject", "Project", new { projectID = @Model.ProjectID }, new { @target = "_blank" })工程计划履历
        </th>
    </tr>
    <tr>
        <th style="text-align: center">
            计划版本
        </th>
        <th style="text-align: center">
            填报日期
        </th>
        <th style="text-align: center">
            填报人
        </th>
        <th style="text-align: center">
            备注
        </th>
    </tr>
    @foreach (ProjectPlan item in Model.ProjectPlan.Where(item => item.State == (int)Sausage.Common.ProjectDataStateEnum.Confirmed).OrderByDescending(item => item.Version))
    {
        @Html.Raw("<tr><td style=\"border-left-width :1px;text-align: center;\">")
        @Html.ActionLink(string.Format("{0:00}", item.Version), "ViewPlan", "ProjectPlan", new { planID = item.PlanID }, new { @target = "_blank" })
        @Html.Raw("</td>")
        @Html.Raw(string.Format("<td>{0:yyyy年MM月dd日}</td>", item.ApplicationDate))
        @Html.Raw(string.Format("<td>{0}</td>", item.Applicant))
        @Html.Raw(string.Format("<td>{0}</td>", item.Memo))
        @Html.Raw("</tr>")
    }
</table>
</div>
<br />
